const lms_config = {
    //request_url: "http://127.0.0.1:8081"
    //base_url: "http://host2.leamus.cn",
    //api_url: "http://host2.leamus.cn",
    api_url: "http://127.0.0.4",
    base_path: "/lms_admin/",
}
//所有 table 实例均会有效，这样就不用在每个 table.render() 都设置一次 token
// layui.table.set({
//     headers: {
//         Author: 'Leamus',
//         Authorization: getUserInfo() != undefined ? getUserInfo()["token"] : ''
//     }
// });

// layui.upload.set({
//     headers: {
//         Author: 'Leamus',
//         Authorization: getUserInfo() != undefined ? getUserInfo()["token"] : ''
//     }
// })

const table = layui.table; // 获得 table 模块对象
let options = {
    skin: 'line',
};
table.set(options);




window.errors = function (html) {
    let MODULE_PATH = lms_config.base_path + '/view/error/' + html;
    layer.open({
        type: 2,
        title: false,
        skin: 'layui-layer-win10', // 2.8+
        shadeClose: true, // 点击遮罩区域，关闭弹层
        closeBtn: false,
        maxmin: false,
        shade: 0.1,
        area: ['100%', '100%'],
        content: MODULE_PATH,
        cancel: function () {
        }
    });
}
